﻿
using System;
using System.ServiceModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnterpriseServices.Service
{
    /// <summary>
    /// 
    /// </summary>
    class MembershipService : IMembershipManager
    {

        #region IMembershipManager Members

        /// <summary>
        /// Creates a new userName that is not an Active Directory userName.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="password">The password.</param>
        /// <param name="email">The email.</param>
        /// <param name="passwordQuestion">The password question.</param>
        /// <param name="passwordAnswer">The password answer.</param>
        /// <param name="isApproved">if set to <c>true</c> [is approved].</param>
        [OperationBehavior(TransactionScopeRequired = true)]
        public void CreateUser(string application, string userName, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved)
        {
					// TODO : Call Stored Proc p_Users_CreateUser with IsADDeployed set to false
					//				Call Stored Proc p_Membership_UpdateUser
            throw new NotImplementedException();
        }
				
				/// <summary>
				/// Creates a new userName that is an Active Directory userName.
				/// </summary>
				/// <param name="userName"></param>
				public void CreateUser(string userName)
				{
					// TODO : Call Stored Proc p_Users_CreateUser with IsADDeployed set to true
					throw new NotImplementedException();
				}

        /// <summary>
        /// Deletes the specified userName.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="deleteAllRelatedData">if set to <c>true</c> [delete all related data].</param>
        /// <returns></returns>
        [OperationBehavior(TransactionScopeRequired = true)]
        public bool DeleteUser(string application, string userName, bool deleteAllRelatedData)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes all userNames,and optionally removed all relevant data
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="deleteAllRelatedData">if set to <c>true</c> [delete all related data].</param>
        [OperationBehavior(TransactionScopeRequired = true)]
        public void DeleteAllUsers(string application, bool deleteAllRelatedData)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns the userName matching the specified email.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="email">The email.</param>
        /// <returns></returns>
        public string GetUserNameByEmail(string application, string email)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the number of userNames currently accessing an application
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int GetNumberOfUsersOnline(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Updates the userName record and status. May require a password answer.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="email">The email.</param>
        /// <param name="oldAnswer">The old answer.</param>
        /// <param name="newQuestion">The new question.</param>
        /// <param name="newAnswer">The new answer.</param>
        /// <param name="isApproved">if set to <c>true</c> [is approved].</param>
        /// <param name="isLockedOut">if set to <c>true</c> [is locked out].</param>
        [OperationBehavior(TransactionScopeRequired = true)]
        public void UpdateUser(string application, string userName, string email, string oldAnswer, string newQuestion, string newAnswer, bool isApproved, bool isLockedOut)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// ]Specifies the number of minutes after the last activity date-time stamp for a userName during which the userName is considered on-line. Returns the number of minutes after the last activity date-time stamp for a userName during which the userName is considered on-line
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int UserIsOnlineTimeWindow(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns all of the userNames in the database.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public string[] GetAllUsers(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the information from the data source for the specified userName.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <returns></returns>
        public UserInfo GetUserInfo(string application, string userName)
        {
            throw new NotImplementedException();
        }

        #endregion


        #region IMembershipManager Members

        public void CreateUser(string userName, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved)
        {
            throw new NotImplementedException();
        }

        public bool DeleteUser(string userName, bool deleteAllRelatedData)
        {
            throw new NotImplementedException();
        }

        public void DeleteAllUsers(bool deleteAllRelatedData)
        {
            throw new NotImplementedException();
        }

        public string GetUserNameByEmail(string email)
        {
            throw new NotImplementedException();
        }

        public int GetNumberOfUsersOnline()
        {
            throw new NotImplementedException();
        }

        public void UpdateUser(string userName, string email, string oldAnswer, string newQuestion, string newAnswer, bool isApproved, bool isLockedOut)
        {
            throw new NotImplementedException();
        }

        public int UserIsOnlineTimeWindow()
        {
            throw new NotImplementedException();
        }

        public string[] GetAllUsers()
        {
            throw new NotImplementedException();
        }

        public UserInfo GetUserInfo(string userName)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
